package contest.dweek33;

import java.util.LinkedList;
import java.util.Queue;

/**
 * @author code_yc
 * @version 1.0
 * @date 2020/8/22 22:29
 */
public class Solution1 {

    public String thousandSeparator(int n) {
        String s = n + "";
        String res = "";
        while (s.length() > 3) {
            res = "." + s.substring(s.length() - 3, s.length()) + res;
            s = s.substring(0, s.length() - 3);
        }
        if (s.length() == 0) {
            return res.substring(1);
        }
        return s + res;
    }
}
